﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ViewLog.aspx.cs"
    Inherits="ContractManagementSystem.ViewLog" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PanelContent" runat="server">
    <asp:Panel runat="server" ID="ListLog">
        <h2 class="divTitle">
            List All Log</h2>
        <br />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <fieldset style="width: 98%; margin: auto; padding-left: 7px; padding-bottom: 10px;"
                            class="border">
                            <legend style="padding: 0px 5px 0px 5px; text-shadow: 3px 3px 3px #74907A; color: #045D97">
                                <b>Search</b></legend>
                <div style="margin-left: 10px; float: left">
                    Type Log:
                    <asp:DropDownList ID="TypeLog" AutoPostBack="True" runat="server" OnSelectedIndexChanged="TypeLogSelectedIndexChanged">
                    </asp:DropDownList>
                </div>
                <div style="margin: 4px 0 0 150px; float: left;">
                    From Date:
                    <asp:TextBox ID="FromDateTextBox" Enabled="False" BackColor="white" runat="server"></asp:TextBox>
                    <asp:ImageButton ID="Image1" runat="server" CssClass="calender" ImageUrl="~/Images/calendar.png" />
                    <cc1:CalendarExtender ID="CalendarExtender1" CssClass="cal_Theme1" runat="server"
                                          TargetControlID="FromDateTextBox" PopupButtonID="Image1" PopupPosition="BottomRight">
                    </cc1:CalendarExtender>
                </div>
                <div style="margin-left: 600px;">
                    To Date:
                    <asp:TextBox ID="ToDateTextBox" Enabled="False" BackColor="white" runat="server"></asp:TextBox>
                    <asp:ImageButton ID="Image3" runat="server" CssClass="calender" ImageUrl="~/Images/calendar.png" />
                    <cc1:CalendarExtender ID="CalendarExtender2" CssClass="cal_Theme1" runat="server"
                                          TargetControlID="ToDateTextBox" PopupButtonID="Image3" PopupPosition="BottomRight">
                    </cc1:CalendarExtender>
                    <asp:Button ID="SearchButton" Text="Search" runat="server" OnClick="SearchButtonClick">
                    </asp:Button>
                </div>
                </fieldset>
                <asp:ListView runat="server" ItemPlaceholderID="NewItem" ID="ViewAllLogSystem" OnItemDeleting="ViewAllLogSystem_OnItemDeleting"
                              OnItemEditing="ViewAllLogSystem_OnItemEditing" OnItemCommand="ViewAllLogSystemItemCommand"
                              OnSorting="ViewAllLogSystemSorting">
                    <LayoutTemplate>
                        <table id="table">
                            <tr>
                            <th>
                                <asp:LinkButton runat="server" ToolTip="Sort" CommandName="Sort" CommandArgument="Content"
                                                ID="FullNameSort">
                                    Content
                                </asp:LinkButton>
                                <asp:Image runat="server" ID="SortFullName" ImageUrl="~/App_Themes/Admin/Image/down.png" />
                            </th>
                            <th>
                                <asp:LinkButton runat="server" ToolTip="Sort" ID="LinkButton98">
                                    Createdate
                                </asp:LinkButton>
                                <asp:Image runat="server" ID="Image1" ImageUrl="~/App_Themes/Admin/Image/down.png" />
                            </th>
                            <th>
                                <asp:LinkButton runat="server" ToolTip="Sort" ID="LinkButton10">
                                    UserName
                                </asp:LinkButton>
                                <asp:Image runat="server" ID="Image2" ImageUrl="~/App_Themes/Admin/Image/down.png" />
                            </th>
                            <tr>
                                <asp:PlaceHolder runat="server" ID="NewItem"></asp:PlaceHolder>
                            </tr>
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr class="odd">
                            <td style="text-align: left; padding-left: 10px">
                                <asp:Label runat="server" ID="FullName" Text='<%#Eval("Content") %>'></asp:Label>
                            </td>
                            <td style="text-align: left; padding-left: 10px">
                                <asp:Label runat="server" ID="Gender" Text='<%#Eval("Createdate") %>'></asp:Label>
                            </td>
                            <td style="text-align: left; padding-left: 10px">
                                <asp:Label runat="server" ID="Email" Text='<%#Eval("UserName") %>'></asp:Label>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <tr class="alt">
                            <td style="text-align: left; padding-left: 10px">
                                <asp:Label runat="server" ID="FullName" Text='<%#Eval("Content") %>'></asp:Label>
                            </td>
                            <td style="text-align: left; padding-left: 10px">
                                <asp:Label runat="server" ID="Gender" Text='<%#Eval("Createdate") %>'></asp:Label>
                            </td>
                            <td style="text-align: left; padding-left: 10px">
                                <asp:Label runat="server" ID="Email" Text='<%#Eval("UserName") %>'></asp:Label>
                            </td>
                        </tr>
                    </AlternatingItemTemplate>
                </asp:ListView>
                <div class="divPage">
                    <asp:LinkButton ID="FirstPageButton" Text="First" runat="server" OnClick="FirstPageButton_Click" />
                    <asp:LinkButton ID="PreviewPageButton" Text="Preview" runat="server" OnClick="PreviewPageButton_Click" />
                    <asp:Label ID="PageLabel" runat="server" CssClass="curent"></asp:Label>
                    <asp:LinkButton ID="NextPageButton" Text="Next" runat="server" OnClick="NextPageButton_Click" />
                    <asp:LinkButton ID="LastPageButton" Text="Last" runat="server" OnClick="LastPageButton_Click" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>
</asp:Content>
